package com.second.statistics.controller;

import com.second.common.pojo.Course;
import com.second.common.vo.Result;
import com.second.statistics.service.StatCourseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: second-education-parent
 * @description:
 * @author: 王子朋
 * @create: 2023-05-29 15:08
 **/
@RestController
@RequestMapping("/stat/course")
@Api(tags = "统计分析-课程销量")
public class StatCourseController {
    @Autowired
    private StatCourseService statCourseService;
    @ApiOperation("查询课程表")
    @PostMapping("/queryAll")
    public Result findAllCourse(){
        List<Course> all = statCourseService.findAll();
        return Result.success(all);
    }
}
